import request from "../utils/request";

/* 上传图片接口 */
export function UploadImg(data) {
  return request({
    url: '/common/upload',
    method: 'post',
    /*headers: {
      "Content-Type": "application/json"
    },*/
    data,
  })
}

/* 客户下单流转 */
// 运营订单表
export function GetQwOrder(query) {
    return request({
      url: '/qw_order',
      method: 'get',
      params:query,
    })
}
// 新增运营订单
export function CreateOperate(query) {
  return request({
    url: '/save_order',
    method: 'post',
    params:query,
  })
}
// 延迟报备单列表
export function GetQwDelayOrder(query) {
  return request({
    url: '/qw_delay_order',
    method: 'get',
    params:query,
  })
}
// 修改接口
export function UpdataOrder(query) {
  return request({
    url: '/update_order',
    method: 'post',
    params:query,
  })
}
// 发货表
export function GetShipList(query) {
  return request({
    url: '/getShipList',
    method: 'get',
    params:query,
  })
}
// 发货表已发货未发货数量
export function GetShipListCount() {
  return request({
    url: '/getShipListCount',
    method: 'get',
  })
}
// 获取快递
export function GetExpressList() {
  return request({
    url: '/getExpressList',
    method: 'get',
  })
}
// 发货流转单确认发货
export function SaveOnlyShip(query) {
  return request({
    url: '/saveOnlyShip',
    method: 'post',
    params:query,
  })
}
// 线下订单表
export function getOfflineOrderList(query) {
  return request({
    url: '/offlineOrderList',
    method: 'get',
    params:query,
  })
}
// 获取选择库存
export function GetShipStockListBySku(query) {
  return request({
    url: '/stock/getShipStockListBySku',
    method: 'post',
    params:query
  })
}
// 发货新增
export function addShip(query) {
  return request({
    url: '/addShip',
    method: 'post',
    params:query,
  })
}
// 发货获取所有订单
export function getQwOrderSelect(query) {
  return request({
    url: '/qw_order_select',
    method: 'get',
    params:query,
  })
}
// 发货修改
export function UpdateShip(query) {
  return request({
    url: '/updateShip',
    method: 'post',
    params:query,
  })
}
// 退货流转单
export function GetReturnList(query) {
  return request({
    url: '/getReturnList',
    method: 'get',
    params:query,
  })
}
// 退货退款订单
export function GetReturnAndAfsList(query) {
  return request({
    url: '/getReturnAndAfsList',
    method: 'get',
    params:query,
  })
}
// 退货关联库
export function GetStockDownInQvList() {
  return request({
    url: '/stock/getStockDownInQvList',
    method: 'get',
  })
}
// 退货新增
export function addReturn(query) {
  return request({
    url: '/addReturn',
    method: 'post',
    params:query,
  })
}
// 退货修改
export function UpdateReturn(query) {
  return request({
    url: '/updateReturn',
    method: 'post',
    params:query,
  })
}
// 换货流转单
export function GetExchangeList(query) {
  return request({
    url: '/getExchangeList',
    method: 'get',
    params:query,
  })
}
// 换货流转单确认发货
export function SaveOnlyExchangeShip(query) {
  return request({
    url: '/saveOnlyExchangeShip',
    method: 'post',
    params:query,
  })
}
// 换货新增
export function addExchange(query) {
  return request({
    url: '/addExchange',
    method: 'post',
    params:query,
  })
}
// 换货修改
export function UpdateExchange(query) {
  return request({
    url: '/updateExchange',
    method: 'post',
    params:query,
  })
}
// 采购列表
export function getProcureList(query) {
  return request({
    url: '/procure/getProcureList',
    method: 'get',
    params:query,
  })
}
// 采购明细
export function getProcureDetailList(query) {
  return request({
    url: '/procure/getProcureDetailList',
    method: 'get',
    params:query,
  })
}
// 采购订单
export function getProcureOrderList(query) {
  return request({
    url: '/procure/order/getProcureOrderList',
    method: 'get',
    params:query,
  })
}


/* 库存日报 */
// 厂商列表
export function GetSupplierList() {
  return request({
    url: '/stock/getSupplierList ',
    method: 'get',
  })
}
// 仓库类型
export function GetWarehouseList() {
  return request({
    url: '/stock/getWarehouseList ',
    method: 'get',
  })
}
// 获取sku列表
export function GetStockSkuList(query) {
  return request({
    url: '/stock/getSkuList',
    method: 'get',
    params:query,
  })
}
// 备货入库列表
export function GetStockUpInList(query) {
  return request({
    url: '/stock/getStockUpInList',
    method: 'get',
    params:query,
  })
}
// 备货入库数量
export function GetStockUpInListCount(query) {
  return request({
    url: '/stock/getStockUpInListCount',
    method: 'get',
    params:query,
  })
}
// 备货入库新增
export function addStockUpIn(query) {
  return request({
    url: '/stock/addStockUpIn',
    method: 'post',
    params:query,
  })
}
// 备货入库修改
export function UpdateStockUpIn(query) {
  return request({
    url: '/stock/updateStockUpIn',
    method: 'post',
    params:query,
  })
}
// 退货入库列表
export function GetStockDownInList(query) {
  return request({
    url: '/stock/getStockDownInList',
    method: 'get',
    params:query,
  })
}
// 退货入库新增
export function addStockDownIn(query) {
  return request({
    url: '/stock/addStockDownIn',
    method: 'post',
    params:query,
  })
}
// 退货入库修改
export function UpdateStockDownIn(query) {
  return request({
    url: '/stock/updateStockDownIn',
    method: 'post',
    params:query,
  })
}

/* 出库日报列表 */
// 新订单出库
export function GetStockOutNewList(query) {
  return request({
    url: '/stock/getStockOutNewList',
    method: 'get',
    params:query,
  })
}
// 换货订单出库列表
export function GetStockOutExchangeList(query) {
  return request({
    url: '/stock/getStockOutExchangeList',
    method: 'get',
    params:query,
  })
}
// 出库新增
export function addStockOut(query) {
  return request({
    url: '/stock/addStockOut',
    method: 'post',
    params:query,
  })
}
// 出库修改
export function UpdateStockOut(query) {
  return request({
    url: '/stock/updateStockOut',
    method: 'post',
    params:query,
  })
}
// // 删除入库
// export function DelStockDownIn(id) {
//   return request({
//     url: `/stock/delStockDownIn?id=${id}`,
//     method: 'post',
//   })
// }
// 删除入库新加审批
export function DelStockDownIn(query) {
  return request({
    url: `/stock/delStockUpIn`,
    method: 'post',
    params:query
  })
}
// 删除出库
export function DelStockDownOut(id) {
  return request({
    url: `/stock/delStockDownOut?id=${id}`,
    method: 'post',
  })
}
// 退款跟进明细
export function GetReturnFollowList(query) {
  return request({
    url: '/getReturnFollowList',
    method: 'get',
    params:query,
  })
}
// 添加退款跟进记录
export function addReturnFollow(query) {
  return request({
    url: '/addReturnFollow',
    method: 'post',
    params:query,
  })
}
// 修改退款跟进记录
export function UpdateReturnFollow(query) {
  return request({
    url: '/updateReturnFollow?',
    method: 'post',
    params:query,
  })
}

// 删除退款记录
export function delReturnFollow(orderId) {
  return request({
    url: `/delReturnFollow?orderId=${orderId}`,
    method: 'post',
  })
}

/* 安装日报 */
// 获取安装日报
export function GetInstallDailyList(query) {
  return request({
    url: '/getInstallDailyList',
    method: 'get',
    params:query,
  })
}
// 获取安装日报二级列表
export function GetInstallDailyListByOrderId(query) {
  return request({
    url: '/getInstallDailyListByOrderId',
    method: 'get',
    params:query,
  })
}
// 添加安装日报
export function AddInstallDaily(query) {
  return request({
    url: '/addInstallDaily',
    method: 'post',
    params:query,
  })
}
// 修改安装日报
export function UpdateInstallDaily(query) {
  return request({
    url: '/updateInstallDaily',
    method: 'post',
    params:query,
  })
}
// 删除安装日报
export function delInstallDaily(id) {
  return request({
    url: `/delInstallDaily?id=${id}`,
    method: 'post',
  })
}

/* 售后日报 */
// 获取售后日报
export function GetAfsDailyList(query) {
  return request({
    url: '/getAfsDailyList',
    method: 'get',
    params:query,
  })
}
// 获取售后日报二级分类
export function GetAfsDailyListByOrderId(query) {
  return request({
    url: '/getAfsDailyListByOrderId',
    method: 'get',
    params:query,
  })
}
// 添加售后日报
export function addAfsDaily(query) {
  return request({
    url: '/addAfsDaily',
    method: 'post',
    params:query,
  })
}
// 修改售后日报
export function UpdateAfsDaily(query) {
  return request({
    url: '/updateAfsDaily',
    method: 'post',
    params:query,
  })
}
// 删除售后日报
export function delAfsDaily(id) {
  return request({
    url: `/delAfsDaily?id=${id}`,
    method: 'post',
  })
}
//(预留接口)
export function a(query) {
  return request({
    url: ``,
    method: 'post',
    params :query
  })
}
//(预留接口)
export function b(query) {
  return request({
    url: ``,
    method: 'get',
    params :query
  })
}
